﻿// /* **********************************************************************************
//  *
//  * Copyright (c) Sky Sanders. All rights reserved.
//  * 
//  * This source code is subject to terms and conditions of the Microsoft Public
//  * License (Ms-PL). A copy of the license can be found in the license.htm file
//  * included in this distribution.
//  *
//  * You must not remove this notice, or any other, from this software.
//  *
//  * **********************************************************************************/
using SimpleRemoteControl.Configuration;
using SimpleRemoteControl.Data.Domain;

namespace SimpleRemoteControl.Data.Repositories
{
    public static class ServerRepository
    {
        public static Server GetServer()
        {
            return Map(Common.Config);
        }

        private static Server Map(RemoteControlSection el)
        {
            Server result = new Server
                                {
                                    Address = el.Address,
                                    Platform = el.Platform,
                                    Browsers = BrowserRepository.Get()
                                };
            return result;
        }
    }
}